package net.luerything.restlet.gwt.rpc;

import org.restlet.data.MediaType;
import org.restlet.data.Status;
import org.restlet.representation.Representation;

/**
 * @author keke
 */
public final class Commons {
  /**
   * MediaType for GWT RPC request <code>text/x-gwt-rpc</code>
   */
  public static final MediaType GWT_RPC = MediaType.register("text/x-gwt-rpc", "GWT RPC");

  /**
   * Result of GWT RPC call.
   */
  public static class Result {
    private Representation result;
    private Status status;

    public Result(final Representation result, final Status status) {
      this.result = result;
      this.status = status;
    }

    public Representation getResult() {
      return result;
    }

    public Status getStatus() {
      return status;
    }
  }

  private Commons() {
  }
}
